import validation from './lib/validation.js'

Vue.directive('validate', (el, binds) => {
  let modifiers = binds.modifiers
  if (Object.keys(modifiers).length == 0) return
  // 一定有修饰符
  Object.keys(modifiers).forEach(key => validation[key](el, binds.value))
})
